/* 学习规划页面样式 */
.study-plan-container {
  width: 100%;
  background: transparent;
  padding: 0;
  overflow: visible;
}

/* 网格布局样式 */
.study-plan-container .ant-row {
  margin: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.study-plan-container .ant-col {
  margin-bottom: 0;
  min-width: 320px;
  flex: 0 0 auto;
  padding: 0;
}

/* 响应式布局优化 */
@media (max-width: 576px) {
  .study-plan-container .ant-col {
    min-width: 100%;
    flex: 0 0 100%;
  }
  
  .study-plan-container .ant-row {
    gap: 16px;
  }
}

@media (min-width: 576px) and (max-width: 768px) {
  .study-plan-container .ant-col {
    min-width: calc(50% - 16px);
    flex: 0 0 calc(50% - 16px);
  }
  
  .study-plan-container .ant-row {
    gap: 20px;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  .study-plan-container .ant-col {
    min-width: calc(33.333% - 22px);
    flex: 0 0 calc(33.333% - 22px);
  }
  
  .study-plan-container .ant-row {
    gap: 24px;
  }
}

@media (min-width: 992px) and (max-width: 1200px) {
  .study-plan-container .ant-col {
    min-width: calc(25% - 24px);
    flex: 0 0 calc(25% - 24px);
  }
  
  .study-plan-container .ant-row {
    gap: 28px;
  }
}

@media (min-width: 1200px) {
  .study-plan-container .ant-col {
    min-width: calc(20% - 26px);
    flex: 0 0 calc(20% - 26px);
  }
  
  .study-plan-container .ant-row {
    gap: 32px;
  }
}

/* 滚动条样式优化 */
.study-plan-container::-webkit-scrollbar {
  width: 8px;
}

.study-plan-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.study-plan-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.study-plan-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 在小屏幕上优化卡片显示 */
@media (max-width: 768px) {
  .study-card {
    min-width: 100%;
    max-width: 100%;
    height: 450px;
  }
}

/* 卡片主体样式 */
.study-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
  height: 480px;
  min-width: 320px;
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.study-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 卡片头部渐变背景 */
.study-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  border-radius: 16px 16px 0 0;
}

/* 移除拖拽手柄样式 */

/* 卡片操作按钮 */
.card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.study-card:hover .card-actions {
  opacity: 1;
}

.card-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-action-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.1);
}

.card-action-btn.danger:hover {
  background: rgba(255, 77, 79, 0.1);
  color: #ff4d4f;
}

/* 卡片内容区域 */
.card-content {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

/* 卡片标题 */
.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片描述 */
.card-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 日期信息 */
.card-date-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border-left: 3px solid #667eea;
}

.card-date-icon {
  color: #667eea;
  font-size: 16px;
}

.card-date-text {
  font-weight: 500;
  font-size: 14px;
  color: #2c3e50;
}

/* 待办事项区域 */
.card-todos {
  flex: 1;
  margin-bottom: 20px;
}

.card-todos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-todos-title {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
}

.card-todos-count {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* 待办事项列表 */
.todos-list {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.todos-list::-webkit-scrollbar {
  width: 4px;
}

.todos-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}

.todos-list::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 2px;
}

.todos-list::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-item:hover {
  background: rgba(102, 126, 234, 0.02);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}

.todo-checkbox {
  margin-right: 12px;
}

.todo-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  transition: all 0.2s ease;
}

.todo-text.completed {
  text-decoration: line-through;
  color: #999;
}

.todo-delete-btn {
  margin-left: 8px;
  padding: 4px;
  opacity: 0;
  transition: all 0.2s ease;
}

.todo-item:hover .todo-delete-btn {
  opacity: 1;
}

/* 添加待办事项输入框 */
.add-todo-input {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.add-todo-input .ant-input {
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  font-size: 13px;
  transition: all 0.2s ease;
}

.add-todo-input .ant-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 空状态 */
.empty-todos {
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .study-card-wrapper {
    width: 280px;
    height: 400px;
  }
  
  .card-content {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .study-plan-container {
    padding: 16px;
  }
  
  .study-card-wrapper {
    width: 260px;
    height: 380px;
  }
  
  .card-content {
    padding: 12px;
  }
  
  .card-title {
    font-size: 16px;
  }
}

/* 拖拽动画 */
@keyframes dragStart {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05) rotate(2deg);
  }
}

@keyframes dragEnd {
  0% {
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    transform: scale(1);
  }
}

.drag-start {
  animation: dragStart 0.2s ease-out forwards;
}

.drag-end {
  animation: dragEnd 0.3s ease-out forwards;
}

/* 拖拽占位符 */
.drag-placeholder {
  background: rgba(102, 126, 234, 0.1);
  border: 2px dashed #667eea;
  border-radius: 16px;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  font-weight: 500;
  transition: all 0.3s ease;
}

.drag-placeholder:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: #5a6fd8;
}
